<div class="tableToolbar">
    <div class="coll-md-9" id="addInput">
        <div class="coll-md-2">
            <input type="text" class='search' placeholder="用户名" ng-model="ctrlScope.itemsearch.username">
        </div>
        <div class="coll-md-2 scalenone" id="search2">
            <div class="coll-md-10">
                <input type="text" class='search' placeholder="真实姓名" ng-model="ctrlScope.itemsearch.realname">
            </div>
        </div>
        <div class="coll-md-5 scalenone"  id="searchdate" datahide>
            <div class="coll-md-5" >
                <p class="input-group">
                    <input type="text" class="search" placeholder="开始时间" uib-datepicker-popup="yyyy-MM-dd"
                           ng-model="ctrlScope.itemsearch.beginDateTimex" is-open="popup1.opened" datepicker-options="dateOptions"/>
						<span class="input-group-btn">
							            <button type="button" class="small-icon btn btn-default" ng-click="open1()"><i
                                                class="glyphicon glyphicon-calendar"></i></button>
							          </span>
                </p>
            </div>
            <div class="coll-md-5">
                <p class="input-group inline">
                    <input type="text" class="search" placeholder="结束时间" uib-datepicker-popup="yyyy-MM-dd"
                           ng-model="ctrlScope.itemsearch.endDateTimex" is-open="popup2.opened" datepicker-options="dateOptions"/>
						<span class="input-group-btn">
							            <button type="button" class="small-icon btn btn-default" ng-click="open2()"><i
                                                class="glyphicon glyphicon-calendar"></i></button>
							          </span>
                </p>
            </div>
        </div>
        <div class="coll-md-1">
            <input type="button" class="small-icon search2-icon" value="搜索" ng-click="search()">
            <input type="button" class="small-icon search2" value="搜索">
            <input type="button" class="small-icon reset-icon" reset-icon value="重置" ng-click="reset()">
            <input type="button" class="small-icon reset" value="重置">

            <div class="dropdown-menu-right">
                <input type="button" class="small-icon more-icon" value="更多" title='更多搜索项' id="more-icon" data-toggle="dropdown"
                       aria-haspopup="true" aria-expanded="false">
                <input type="button" class="small-icon more" value="更多">
                <ul class="dropdown-menu" style='margin-left:80px;' aria-labelledby="dropdownMenu2" more-search>
                    <li><a href="javascript:;">日期搜索</a></li>
                    <li><a href="javascript:;">其他条件搜索</a></li>
                </ul>
            </div>
        </div>
    </div>
    <div class="coll-md-1">
        <button class="small-icon btn btn-default pos-right"  ng-click="download()">
            <i class="fa fa-download"></i>
        </button>
    </div>
</div>
<table ui-table="orderParams">
    <thead>
    <tr>

        <th>
            用户名
        </th>
        <th>
            手机号
        </th>
        <th>
            真实姓名
        </th>
        <th>
            收益(元)
        </th>
        <th>
            收益类型
        </th>
        <th>
            添加时间
        </th>
        <th>
            操作
        </th>
    </tr>
    </thead>
    <tbody>
    <tr ng-repeat="item in orderParams.$rows">
        <td>{{item.username}}</td>
        <td>{{item.mobile}}</td>
        <td>{{item.realname}}</td>
        <td>{{item.income}}</td>
        <td>{{item.incomeType | incomeType}}</td>
        <td>{{item.addtime |date:'yyyy-MM-dd HH:mm:ss'}}</td>
        <td><a ng-click="checkDetail(item.id)">查看</a></td>
    </tr>
    </tbody>
</table>

<modal title="新建" visible="orderModal">
    <form  class="form-horizontal" role="form" >
        <div class="form-body">
            <div class="row">
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">用户id</label>
                        <div class="col-md-8">
                            <input type="text" class="form-control" ng-model="add.userId"  name="userId" placeholder="用户id">
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">邀请人id</label>
                        <div class="col-md-8">
                            <input type="text" class="form-control" ng-model="add.inviteId" name="inviteId" placeholder="邀请人id">
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">收益</label>
                        <div class="col-md-8">
                            <input type="text" class="form-control" ng-model="add.income" name="income" placeholder="收益">
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">收益类型</label>
                        <div class="col-md-8">
                            <select name="incomeType" class="form-control">
                                <option value="1">注册</option>
                                <option value="2">投资</option>
                                <option value="3">实名</option>
                                <option value="4">认证</option>
                            </select>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">费用</label>
                        <div class="col-md-8">
                            <input type="text" class="form-control" ng-model="add.cost" name="cost" placeholder="费用">
                        </div>
                    </div>
                </div>
            </div>
            <button type="button" class="btn blue" ng-click="submit()"  style="float: right">提交</button>
        </div>
    </form>
</modal>


<modal title="查看" visible="detailModal">
    <form  class="form-horizontal" role="form" >
        <div class="form-body">
            <div class="row">
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">流水号</label>
                        <div class="col-md-8">
                            <input type="text" class="form-control" ng-model="check.orderNo"  readonly>
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">投资项目</label>
                        <div class="col-md-8">
                            <input type="text" class="form-control" ng-model="check.itemName" readonly>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">金额</label>
                        <div class="col-md-8">
                            <input type="text" class="form-control" ng-value="check.investDealAmount+'元'" readonly>
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">年化额</label>
                        <div class="col-md-8">
                            <input type="text" class="form-control" ng-value="check.yearAmount+'元'"  readonly>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">提成比例</label>
                        <div class="col-md-8">
                            <input type="text" class="form-control" ng-value="check.rate"  readonly>
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">期限</label>
                        <div class="col-md-8">
                            <input type="text" class="form-control" ng-value="check.itemCycle+'天'"  readonly>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>
</modal>
